var where;
function getFlowFace(id,wel){
		where=wel;
			 $.ajax({
					url:'/admin/flowFace/getFlowFace',
					type:'post',
					data:{id:id},
					dataType:'json',
					success:function(data){
						if(data.success){
						  $(".flow_face").remove(); 
						    var val="<tr class='flow_face'><td colspan='7' align='center'><table width='98%'  style='background:#F0F9FD;margin: 5px;border:1px solid #ccc'>"+
					   		        "<tr style='background:#DAEEF5;'>"+
					   		        "<td width='10%'>编号</td>"+
					   		        "<td width='10%'>节点名称</td>"+
					   		        "<td width='10%'>节点描述</td>"+
					   		        "<td width='10%'>角色</td>"+
					   		        "<td width='10%'>排序</td>"+
					   		        "<td width='10%'>操作</td>"+
					   		        "</tr>";
					   	  $.each(data.result, function(i, item){  
						           val+="<tr>"+
						                "<td>"+item.id+"</td>"+
								        "<td>"+item.name+"</td>"+
								        "<td>"+item.description+"</td>"+
								        "<td>"+item.roleNames+"</td>"+
								        "<td>"+item.sort+"</td>"+
								        "<td>"+
								        "    <a href=\"javascript:up("+item.id+","+id+")\" class=\"tablelink\">上移</a>"+
								        "    <a href=\"javascript:showForm('用户修改','"+path+"/admin/flowFace/showForm?id="+item.id+"','750','350')\" class=\"tablelink\">修改</a>"+
								        "    <a href=\"javascript:del('"+path+"/admin/flowFace/delete?id="+item.id+"')\" class=\"tablelink\">删除</a>"+
								        "</td>"+
								        "</tr>";    
							     });
					   	         val+="</table></td></tr>";
					             $(wel).after(val);
						}
					 }
				}); 
}
function up(flowFaceId,FlowId,wel){
		 $.ajax({
				url:'/admin/flowFace/up',
				type:'post',
				data:{flowFaceId:flowFaceId,FlowId:FlowId},
				dataType:'json',
				success:function(data){
					if(data.success){
						getFlowFace(FlowId,where);
					}else{
						layer.alert(data.message);
					}
					
				 }
			});
}
